package com.earl.eatbao.service;

import com.earl.eatbao.commons.service.BaseService;
import com.earl.eatbao.domain.eatbao.Comment;

import java.util.List;

public interface CommentService extends BaseService<Comment, Long>{

	/**
	 * 根据订单号来查询评论
	 * @param orderId
	 * @return
	 */
	Comment findOneByOrderId(Long orderId);

	/**
	 * 查看个人所有评论
	 * @param userId 用户ID
	 * @return
	 */
	List<Comment> findUserComments(Long userId);

	/**
	 * 查看商家所有评论
	 * @param businessId
	 * @return
	 */
	List<Comment> findBusinessComments(Long businessId);

    /**
     * 删除评论
     * @param commentId
     * @return
     */
	Boolean deleteComments(Long commentId);

	/**
	 * 评论订单
	 * @param comment
	 * @return boolean
	 */
    Boolean commentsOrders(Comment comment);

    /**
     * 回复评论
     * @param comment
     * @return
     */
    Boolean reventComment(Comment comment);

}
